﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using Wix.Aura.Common.CustomTypes;

namespace Wix.Aura.Common {
	public class Extension : IXmlSerializable{
		public Extension() {
			Mime = new List<Mime>();
			Verb = new List<Verb>();
		}

		public string Id { get; set; }
		public YesNoType Advertise { get; set; }
		public string ContentType { get; set; }

		public ICollection<Mime> Mime { get; set; }
		public ICollection<Verb> Verb { get; set; }

		public System.Xml.Schema.XmlSchema GetSchema() {
			throw new NotImplementedException();
		}

		public void ReadXml(System.Xml.XmlReader reader) {
			throw new NotImplementedException();
		}

		public void WriteXml(System.Xml.XmlWriter writer) {
			writer.WriteStartElement("Extension");
			writer.WriteAttribute("Id", Id);
			writer.WriteAttribute("Advertise", Advertise);
			writer.WriteAttribute("ContentType", ContentType);
			writer.WriteElements(Mime);
			writer.WriteElements(Verb);
			writer.WriteEndElement();
		}
	}
}
